/**
 * @description Description
 *
 * @author Candy <candy.yan@motionglobal.com>
 * @date  Creation Date 2018/7/25
 */
import { getUser } from '@/api/index';
import {
  GET_USERINFO
} from './mutation-types';
import { getStore } from '@/utils/index';

export default {
  async getUserInfo({commit, state}) {
    let user_id = getStore('user_id');
    await getUser(user_id).then((res) => {
      commit(GET_USERINFO, res.data.data);
    });
  }
}
